<?php
/**
 * @link https://ym2.cleverstone.top
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

/* ====== 列表构建器 ====== */

/* @var \yii\web\View $this */
/** @var \builder\lists\ListBuilder $context 当前列表组件实例 */
/** @var array $extraJs 额外的JS脚本 */

// 上下文对象
$context = $this->context;

?>

<script>
    +function (global, top) { "use strict";
        global.ym2App.controller("ym2.ctrl.<?= $context->id ?>", [
            "$scope",
            function ($scope) {
                // ...

                //额外的JS脚本
                <?= !empty($extraJs) ? implode("\n", $extraJs) : '' ?>


            },
        ]);
    }(window, top);
</script>
